package com.bnyy.common.bean;

import java.io.Serializable;

/**
 * Author : 关炳鹏
 * Description : 地址信息
 * Date : 2021/11/25
 **/
public class Location implements Serializable {

    private int province_id;
    private int city_id;
    private int county_id;
    private int street_id;

    private int prov_id;

    private int provid;
    private String provname = "";
    private int cityid;
    private String cityname = "";
    private int countyid;
    private String countyname = "";
    private int streetid;
    private String streetname = "";
    private String addr;
    private String province_name = "";
    private String city_name = "";
    private String county_name = "";

    public String getProvince_name() {
        return province_name;
    }

    public void setProvince_name(String province_name) {
        this.province_name = province_name;
    }

    public String getCity_name() {
        return city_name;
    }

    public void setCity_name(String city_name) {
        this.city_name = city_name;
    }

    public String getCounty_name() {
        return county_name;
    }

    public void setCounty_name(String county_name) {
        this.county_name = county_name;
    }

    public int getProvince_id() {
        return province_id;
    }

    public void setProvince_id(int province_id) {
        this.province_id = province_id;
    }

    public int getCity_id() {
        return city_id;
    }

    public void setCity_id(int city_id) {
        this.city_id = city_id;
    }

    public int getCounty_id() {
        return county_id;
    }

    public void setCounty_id(int county_id) {
        this.county_id = county_id;
    }

    public int getStreet_id() {
        return street_id;
    }

    public void setStreet_id(int street_id) {
        this.street_id = street_id;
    }

    public String getAddr() {
        return addr;
    }

    public void setAddr(String addr) {
        this.addr = addr;
    }

    public int getProvid() {
        return provid;
    }

    public void setProvid(int provid) {
        this.provid = provid;
    }

    public String getProvname() {
        return provname;
    }

    public void setProvname(String provname) {
        this.provname = provname;
    }

    public int getCityid() {
        return cityid;
    }

    public void setCityid(int cityid) {
        this.cityid = cityid;
    }

    public String getCityname() {
        return cityname;
    }

    public void setCityname(String cityname) {
        this.cityname = cityname;
    }

    public int getCountyid() {
        return countyid;
    }

    public void setCountyid(int countyid) {
        this.countyid = countyid;
    }

    public String getCountyname() {
        return countyname;
    }

    public void setCountyname(String countyname) {
        this.countyname = countyname;
    }

    public int getStreetid() {
        return streetid;
    }

    public void setStreetid(int streetid) {
        this.streetid = streetid;
    }

    public String getStreetname() {
        return streetname;
    }

    public void setStreetname(String streetname) {
        this.streetname = streetname;
    }

    public int getProv_id() {
        return prov_id;
    }

    public void setProv_id(int prov_id) {
        this.prov_id = prov_id;
    }

    public void setLocation(Location location) {
        if (location != null) {
            setProvid(location.getProvid());
            setProvname(location.getProvname());

            setCityid(location.getCityid());
            setCityname(location.getCityname());

            setCountyid(location.getCountyid());
            setCountyname(location.getCountyname());

            setStreetid(location.getStreetid());
            setStreetname(location.getStreetname());
        }
    }

    public String getLocationStr() {
        return provname + cityname + countyname + streetname;
    }
}
